<?php foreach($taikhoan as $tk):?>
<div id="taikhoan">
    <div class="anh">
        <img src="<?php 
                    if($tk['AnhDaiDien'] == null || $tk['AnhDaiDien'] == '') 
                        echo base_url('images/avatar/default.png');
                    else
                        echo base_url('images/avatar/'.$tk['AnhDaiDien']);
        ?>"/>
    </div>
    <span class="tendangnhap"><?php echo $tk['TenDangNhap'];?></span></br>
    <?php 
    if($tk['DiemNguoiDanhGia'] != null) 
    {
    ?>
    <span>Điểm đánh giá:</span><span class="diem"> <?php echo $tk['DiemNguoiDanhGia'];?></span></br>
    <?php         
    } 
    ?>
    <?php 
    if($tk['DiemNguoiDang'] != null) 
    {
    ?>
    <span>Điểm đăng bài:</span><span class="diem"> <?php echo $tk['DiemNguoiDang'];?></span></br>
    <?php         
    } 
    ?>
    
    <a href="<?=base_url('index.php/qlsp_controller/')?>">
        <button id="quanly" class="ui-widget-header ui-corner-all">Quản Lý</button>
    </a>
    <button id="thoat" class="ui-button-text-only ui-corner-all">Thoát</button>
</div>
<?php endforeach; ?>
<script>
    $('#thoat').click(function(){
        $.ajax({
            type: 'POST',
            url: '<?=base_url()?>index.php/taikhoan_controller/thoat',
            success: function(data){
                $('.login').html(data);
            }
        });
    });
</script>